package ics;

import ics.nodes.Calendar;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * 默认输出为ics文件
 */
public class Out {
    public void outFile(Calendar calendar, File file) throws IOException {
        byte[] result = calendar.toString().getBytes();

        try (FileOutputStream fileOutputStream = new FileOutputStream(file)) {
            fileOutputStream.write(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
